package com.ky.gp.app.service;

import com.ky.common.param.NewsAdd;
import com.ky.common.param.NewsReviewAdd;
import com.ky.common.vo.R;
import com.ky.gp.app.config.OpenFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ky.common.param.QuestionAdd;

/**
 * @version 1.0
 * @Author 小胤
 * @Date 2024/6/16 18:41
 * @注释
 */
@FeignClient(value = "gp-home-server",configuration = OpenFeignConfig.class)
public interface SearchHomeCourseFeign {
    @RequestMapping("/home/getCourse")
    R getCourse();

    @RequestMapping("/home/getArticle")
    public R getArticle();

    @RequestMapping("/home/getExp")
    public R getExp();

    @RequestMapping("/home/getNews")
    public R getNews();

    @RequestMapping("/home/search/{value}")
    public R search(@PathVariable("value")String value);
    @RequestMapping("/home/search/all")
    R searchAll();
    @RequestMapping("/home/searchNews/{value}")
    R searchNews(@PathVariable("value")String value);
    @RequestMapping("/home/getNewsDetails/{id}")
    R getNewsById(@PathVariable("id")int id);
    @RequestMapping("/home/createNews")
    R createNews(@RequestBody NewsAdd newsAdd);


    @RequestMapping("/home/addNewsReview")
    public R addNewsReview(@RequestBody NewsReviewAdd newsReviewAdd);
    @RequestMapping("/home/addLikes")
     R addLikes();
    @RequestMapping("/home/addCollects")
    R addCollects();
    @RequestMapping("/home/zhaosheng/selectBySchoolName/{schoolName}")
    R selectBySchoolName(@PathVariable("schoolName") String schoolName);
    @RequestMapping("/home/yearquestions")
    R getYearquestions();

    @RequestMapping("/home/searchYearQuestion/{yearId}")
    R searchYearquestions(@PathVariable("yearId") int yearId);

    @RequestMapping("/home/exam/searchExam")
    R getQuestion();

    @RequestMapping("/home/exam/searchYearQuestion")
    public R searchYearQuestion(@RequestBody QuestionAdd questionAdd);

    @RequestMapping("/home/examLog/todayQuestions")
    R todayQuestions();

    @RequestMapping("/home/examLog/questions")
    R questions();

    @RequestMapping("/home/question/addCollectsQuestion")
    R addCollectsQuestion(@RequestBody QuestionAdd questionAdd);
    @RequestMapping("/home/getCollectQuestions")
    R getCollectQuestions();
    @RequestMapping("/home/getErrorQuestions")
    R getErrorQuestions();

    @RequestMapping("/home/study-time/updateStudyTime/{studyTime}")
    R updateStudyTime(@PathVariable("studyTime") int studyTime);

    @RequestMapping("/home/study-time/getStudyTime")
    R getStudyTime();

}
